<template>
    <view class="flex-col homepage">
        <view class="u-line-1 text">+{{record.money}}</view>
        <view class="u-line-1 text-two">充值成功</view>
        <u-line class="line" margin="0rpx 0rpx 40rpx 0rpx"></u-line>
        <view class="flex-row wrapper" v-if="iscardNo">
            <view class="u-line-1 text-three">充值卡号</view>
            <view class="u-line-1 text-four" v-if="!!record.patientCard">{{record.patientCard.cardNo}}</view>
        </view>
		<view class="flex-row wrapper" v-if="isopen">
		    <view class="u-line-1 text-three">住院卡号</view>
		    <view class="u-line-1 text-four" v-if="!!record.inpatient">{{record.inpatient.admissionNumber}}</view>
		</view>
        <view class="flex-row wrapper">
            <view class="u-line-1 text-five">支付方式</view>
            <view class="u-line-1 text-six">微信支付</view>
        </view>
        <view class="flex-row wrapper">
            <view class="u-line-1 text-seven">支付时间</view>
            <view class="u-line-1 text-eight">{{record.creationTime}}</view>
        </view>
		<view class="flex-row wrapper" v-if="isopen">
		    <view class="u-line-1 text-seven">支付单号</view>
		    <view class="u-line-1 text-eight" v-if="!!record.drugRecord">{{record.drugRecord.serialNumber}}</view>
		</view>
		
		
    </view>
</template>
<script>
    export default {
        data() {
            return {
				URL: 'http://localhost:9000/' ,//主域名
				record:'',
				isopen:false,
				iscardNo:true
			}
        },
        methods: {
		
        },
		onLoad(options) {
			console.log('options.payId' , options.payId);
			// console.log('options.brId' , options.brId);
			// if(options.payId != 0){
				console.log('options.payId1111' , options.payId)
				uni.request({
					url:this.URL+"record/record/record/recordByrId/"+options.payId,
					method:"GET",
					success: (res) => {	
						console.log(res)
						if(res.data.code == 20000){
							this.record = res.data.data.record
							console.log(this.record)
						}
					}	
				})
			// }
			// if(options.brId != 0){
			// 	console.log('options.brId111' , options.brId)
			// 	//查询住院处充值记录
			// 	uni.request({
			// 		url:this.URL+"record/record/record/drugRecordById/"+options.brId,
			// 		method:"GET",
			// 		success: (res) => {
			// 			console.log(res)
			// 			if(res.data.code == 20000){
			// 				this.record = res.data.data.record
			// 				console.log(this.record)
			// 			}
			// 		}
			// 	})
			// 	this.iscardNo=false
			// 	this.isopen = true
			// }

		}
    }
</script>
<style lang="scss" scoped>
	
	
		.foot-box {
			width: 430rpx;
			height: 100rpx;
			background-color: #666666;
			border-radius: 10px;
			margin-top: 180px;
			margin-left: 80px;
			color: #FFFFFF;
			font-size: 40rpx;
			line-height: 100rpx;
			text-align: center;
		}
		.foot-box1 {
			width: 430rpx;
			height: 100rpx;
			margin-left: 80px;
			color: #666666;
			font-size: 40rpx;
			line-height: 100rpx;
			text-align: center;
		}
	
	
    /** 全局样式-开始,建议放在公共css样式文件中,比如common.css 或app.vue文件 */

    html,
    body {
        margin: 0;
        width: 100%;
        height: 100%;
        font-size: 16px
    }

    view,
    text,
    image {
        position: relative;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .flex-col {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
    }

    .flex-row {
        display: flex;
        align-items: flex-start;
    }

    .flex-col .flex-row {
        width: 100%
    }

    /** 全局样式-结束*/

    .homepage {
        padding: 100rpx 0rpx 0rpx 28rpx;

        .text {
            width: 176rpx;
            margin: 0rpx 0rpx 40rpx 258rpx;
            font-size: 40rpx;
            font-weight: 600;
            color: #ec5555;
        }

        .text-two {
            width: 130rpx;
            margin: 0rpx 0rpx 60rpx 282rpx;
        }

        .line {
            width: 694rpx;
        }

        .wrapper {
            width: 722rpx;
            justify-content: space-between;
            margin-bottom: 40rpx;

            .text-three {
                width: 136rpx;
                color: #c0bfba;
            }

            .text-four {
                width: 556rpx;
            }
        }

        .wrapper {
            width: 722rpx;
            justify-content: space-between;
            margin-bottom: 40rpx;

            .text-five {
                width: 136rpx;
                color: #c0bfba;
            }

            .text-six {
                width: 556rpx;
            }
        }

        .wrapper {
            width: 722rpx;
            justify-content: space-between;
            margin-bottom: 40rpx;

            .text-seven {
                width: 136rpx;
                color: #c0bfba;
            }

            .text-eight {
                width: 556rpx;
            }
        }
    }
</style>